var $path_url = $('base').attr('href');
var controller = $('base').attr('data-controller');

function gerarPDF(){

    location.href = $path_url + controller + '/pdf/';
}